HTMLify
style.css
Views: 17 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | *{ margin:0; padding:0; box-sizing:border-box; } body{ display:flex; align-items:center; justify-content:center; min-height:100vh; background: #262433; } .menu{ position:relative; width:280px; height:280px; display:flex; align-items:center; justify-content:center; } .menu .toggle{ position:relative; height:60px; width:60px; background:#fff; border-radius:50%; box-shadow:0 3px 4px rgba(0,0,0,0.15); display:flex; align-items:center; justify-content:center; color:#333; font-size:2rem; cursor:pointer; transition:1.25s; z-index:5; } .menu.active .toggle{ transform:rotate(360deg); box-shadow: 0 6px 8px rgba(0,0,0,0.15), 0 0 0 2px #333, 0 0 0 8px #fff; } .menu li{ position:absolute; left:0; list-style:none; transition:0.5s; transform:rotate(calc(360deg/8 * var(--i))); transform-origin:140px; scale:0; transition-delay: calc(0.05s * var(--i)); } .menu.active li{ scale:1; } .menu li a{ position:relative; display:flex; transform:rotate(calc(360deg/-8 * var(--i))); width:60px; height:60px; background-color:#FFF; display:flex; align-items:center; justify-content:center; border-radius:50%; font-size:1.75rem; color:var(--clr); box-shadow:0 3px 4px rgba(0,0,0,0.15); transition:0.5s; } .menu li:hover a{ font-size:2.5rem; box-shadow:0 0 0 2px var(--clr), 0 0 0 6px #fff; } |